package com.iss.apartmentmanage.model;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class MyResponseData {
    private Integer errorCode;
    private String status;
    private Object object;
    private List<?> objectList;
    private String msg;
    private Map<String,Object> objectMap;

    public MyResponseData put(String key, Object value) {
        if (this.objectMap == null) {
            this.objectMap = new HashMap();
        }
        this.objectMap.put(key, value);
        return this;
    }
}
